package com.titar.kslikeview;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.titar.kslikeview.widigets.KsLikeView;

public class MainActivity extends AppCompatActivity {

    private KsLikeView kslikeview;

    private Integer[] imgs = {R.drawable.love1,R.drawable.love2,R.drawable.love3,R.drawable.love4,R.drawable.love5,R.drawable.love6};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        kslikeview = findViewById(R.id.kslikeview);
        kslikeview.addLikeImages(imgs);

        findViewById(R.id.add).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                kslikeview.addFavor();
            }
        });
    }
}
